package com.kedeng.yangmuyi.dao;

import java.util.List;

import com.kedeng.yangmuyi.exception.SystemException;

/**
 * 
 * @ClassName: BaseDAO
 * @Description: Base DAO include all operation in Database.
 * @author rqian
 * @date Aug 8, 2013 2:38:00 PM
 * 
 */
public interface BaseDAO {
    public Object loadById(Class<?> clazz, String id) throws SystemException;
    public Object loadObject(String hql);
    public boolean delById(Class<?> clazz, String id) throws SystemException;
    public boolean save(Object obj) throws SystemException;
    public List<?> listAll(String clazz) throws SystemException;
    public List<?> listAll(String clazz, int pageNo, int pageSize) throws SystemException;
    public int countAll(String clazz);
    public List<?> query(String hql);
    public List<?> query(String hql, int pageNo, int pageSize);
    public int countQuery(String hql);
    public int update(String hql);
    public boolean update(Object obj) throws SystemException;
    public int getNewestVersion(Class<?> clazz, String id) throws SystemException;

}
